package JanChallenges;

//https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/description/?envType=daily-question&envId=2024-01-13
public class Day12_P1347 {
    public int minSteps(String s, String t) {
        char[] target = s.toCharArray();
        char[] cur = t.toCharArray();
        int[] tm = new int[26];
        for(char c: target) {
            tm[c - 'a']++;
        }
        for(char c: cur) {
            tm[c - 'a']--;
        }
        int ans = 0;
        for(int i: tm) {
            ans += Math.max(0, i);
        }
        return ans;
    }
}
